package com.merlin.demo_wellshape.service;

import com.merlin.demo_wellshape.pojo.DailyQuote;
import com.merlin.demo_wellshape.repository.DailyQuoteRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Optional;

@Service
public class DailyQuoteService implements DailyQuoteServiceImpl {
    @Autowired
    private DailyQuoteRepository dailyQuoteRepository;

    // 获取随机一言
    @Override
    public Optional<DailyQuote> getRandomQuote() {
        return dailyQuoteRepository.findRandomQuote();
    }
}
